const request = require("request");
const packages = [
    "@steedos/accounts",
    "@steedos/auth",
    "steedos-cli",
    "@steedos/client",
    "@steedos/core",
    "create-steedos-app",
    "create-steedos-node-red-app",
    "@steedos/data-import",
    "@steedos/design-system-react",
    "@steedos/filters",
    "@steedos/formula",
    "@steedos/i18n",
    "@steedos/metadata-api",
    "@steedos/metadata-core",
    "@steedos/meteor-bundle-dependencies",
    "@steedos/meteor-bundle-runner",
    "@steedos/migrate",
    "@steedos/mongodb-bi-connector",
    "@steedos/node-red-app-template",
    "@steedos/objectql",
    "@steedos/plugin-enterprise",
    "@steedos/process",
    "@steedos/react",
    "@steedos/schemas",
    "@steedos/standard-objects",
    "@steedos/plugin-dingtalk",
    "@steedos/plugin-qywx",
    "@steedos/steedos-plugin-schema-builder",
    "@steedos/tailwind",
    "@steedos/webapp",
    "@steedos/workflow",
    "steedos-server",
    "@steedos/service-accounts",
    "@steedos/service-api",
    "@steedos/service-charts",
    "@steedos/service-cloud-init",
    "@steedos/service-fields-indexs",
    "@steedos/service-metadata-apps",
    "@steedos/service-metadata-layouts",
    "@steedos/service-metadata-objects",
    "@steedos/service-metadata-permissionsets",
    "@steedos/service-metadata-server",
    "@steedos/service-metadata-tabs",
    "@steedos/service-metadata-translations",
    "@steedos/service-metadata-triggers",
    "@steedos/service-metadata",
    "@steedos/service-meteor-package-loader",
    "@steedos/service-mongodb-server",
    "@steedos/service-node-red",
    "@steedos/service-package-loader",
    "@steedos/service-package-registry",
    "@steedos/service-packages",
    "@steedos/service-pages",
    "@steedos/service-steedos-server",
    "@steedos/service-workflow",
    "@steedos/steedos-project-template",
];

packages.forEach(function (packageName) {
    const url = `https://npmmirror.com/sync/${packageName}?sync_upstream=true`;
    request.put(url, (error, response, body) => {
        console.log(url, response.statusCode, body)
    })
})
